package net.xiduth.game.npc.combat.impl;

import net.xiduth.game.Entity;
import net.xiduth.game.npc.NPC;
import net.xiduth.game.npc.combat.CombatScript;
import net.xiduth.game.npc.combat.NPCCombatDefinitions;
import net.xiduth.utils.Misc;

/**
 * 
 * @author Jae <jae@xiduth.com>
 * 
 * @since <Oct 18, 2013>
 *
 */
public class DagannothMother extends CombatScript {
	
	private final int WHITE = 9107, BLUE = 9112, BROWN = 9113, RED = 9114, ORANGE = 9115, GREEN = 9116;

	@Override
	public Object[] getKeys() {
		return new Object[] { 9107 };
	}

	@Override
	public int attack(NPC npc, Entity target) {
		final int[] transformIds = { WHITE, BLUE, BROWN, RED, ORANGE, GREEN };
		npc.transformIntoNPC(transformIds[Misc.random(transformIds.length - 1)]);
		final NPCCombatDefinitions defs = npc.getCombatDefinitions();
		delayHit(npc, 0, target, getMeleeHit(npc, getRandomMaxHit(npc, defs.getMaxHit(), NPCCombatDefinitions.MELEE, target)));
		return 0;
	}

}
